package com.mmt.www.main;

import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 
 * @author 민종근
 *
 * 입력된 ID와 DB의 ID, PW 일치여부
 */
@Repository
public class LoginDao {
	
	Logger log = Logger.getLogger(this.getClass());
	
	@Autowired
	private SqlSession sql;

	/** ID,PW 조회 */
	public MartVO selectIdPw(LoginDto loginDto){		
		
		log.debug("id : " + loginDto.getId() + " pw : " + loginDto.getPasswd());	//id, pw 로그창에 확인
		
		return sql.selectOne("login.idChk", loginDto);
		
	}
}
